﻿using System;

public partial class login : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Context.User.Identity.IsAuthenticated)
            {
                if (Context.User.IsInRole(System.Web.Configuration.WebConfigurationManager.AppSettings["jobseekerrolename"]))
                {
                    Response.Redirect("./jobseeker/editprofile.aspx");
                }
                else if (Context.User.IsInRole(System.Web.Configuration.WebConfigurationManager.AppSettings["employerrolename"]))
                {
                    Response.Redirect("./employer/postjobs.aspx");
                }
            }
        }

    }
}
